package com.googlecode.perfectable.persistable.storage;

import com.googlecode.perfectable.persistable.session.Identifier;
import com.googlecode.perfectable.persistable.session.InvalidReference;

public abstract class AbstractStorageDecorator implements Storage {
	private final Storage inner;

	protected AbstractStorageDecorator(Storage inner) {
		this.inner = inner;
	}

	@Override
	public <T> Identifier<T> persist(T entity) {
		return this.inner.persist(entity);
	}

	@Override
	public <T> void persist(T entity, Identifier<? super T> identity) {
		this.inner.persist(entity, identity);
	}

	@Override
	public <T> T materialize(Identifier<T> identity) throws InvalidReference {
		return this.inner.materialize(identity);
	}

}
